<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<head>
<script type="text/javascript" src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.easyui.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery-easyui-1.5.5.6/locale/easyui-lang-zh_CN.js"/>"></script>
<link rel="stylesheet" type="text/css" href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/default/easyui.css"/>" />
<link rel="stylesheet" type="text/css" href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/icon.css"/>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
	<script type="text/javascript">
		/* $(function() {
			 //返回
			$('.socizl-table-mod-browse-return').linkbutton({
				onClick : function() {
					$(".socizl-table-mod-browse-div").panel({
						href:"social_table_mod"
					});
				}
			});
			//编辑
			$('.socizl-table-mod-browse-redact').linkbutton({
				onClick : function(){
					$(".socizl-table-mod-browse-div").panel({
						href:"social_table_mod_compile?id="+${sm.socialTableModId}
					});
				}
			});  */
			//删除
			/* $('.socizl-table-mod-browse-delete').linkbutton({
				onClick : function(){
					$.messager.confirm('确认', '您确定要删除该模板吗？', function(v){
						if(v){
							$.post("modadd_deleteyw",{id:${bor.id}}, function(r){
								if(r.success){
									$.messager.alert('消息','删除成功！');
									$("#mod-add-browse-div").panel({
										href:"modadd"
									});
								}else{
									$.messager.alert('错误', r.message);
								}
							});
						}
					});
				}
			}); */
			/* //添加多个项目
			$('.social-table-mod-add-mod-add').linkbutton({
				onClick : function(){
					$('.social-mod-sousuo-input').textbox('clear');//清空搜索框
					$('.social-mod-sousuo-input').textbox('setValue','');
					$("#social-table-mod-dialog").dialog("open");
					$('#social-table-mod-table-add-mod').datagrid({ url:'modaddSeslect_forid?text='+$('.social-mod-sousuo-input').val()});//重新指定url
				}
			});
			//项目弹框模糊查询
			$('.social-mod-sousuo-button').linkbutton({
				onClick : function() {
					$('#social-table-mod-table-add-mod').datagrid({ url:'modaddSeslect_forid?text='+$('.social-mod-sousuo-input').val()});//重新指定url
               		//$('#social-table-mod-table-add-mod').datagrid('load',{});
				}
			}); */
			/* //添加新项目页面
			 $(".social-table-mod-add-xmod-add").linkbutton({
				onClick : function() {
					$(".social-table-mod-add-mod-right").panel({
						href:"SalaryTable?id="+${list.templateId}
					  
					});
					
				}
			});  
			 
		});  */
		 
	</script>
	<div class="easyui-panel socizl-table-mod-browse-div"
		data-options="fit:true,border:false,tools:'#insert_bt'">
		<!-- 按钮 -->
		<form id='socizl-table-mod-browse-from' method='get'>
			<div id="insert_bt" class="insert_bt">
				  <a href="#" class="easyui-linkbutton socizl-table-mod-browse-return"
					iconCls="icon-reload" plain="true" title="返回"
					data-options="text:'返回'"></a>
					 <a class="easyui-linkbutton socizl-table-mod-browse-redact"
					data-options="text:'编辑',iconCls:'icon-add',plain:true"
					type="submit"></a> 
					<a class="easyui-linkbutton socizl-table-mod-browse-delete" data-options="text:'删除',iconCls:'icon-add',plain:true"
					type="submit"></a> 
					<span style="float: right; font-size: 12px; margin-top: 5px;">浏览：薪资模板</span>
			</div>
			<div style="height: 10px;"></div>
			<div style="margin-left: 10px">
				<div style="font-size: 14px;">概要</div>
				<div
					style="border-top: 2px solid #2B91D5; width: 420px; display: inline-block; margin-right: 15px;">
					<div class="viewContent" style="margin-top: 15px;">
						<table id="ct1" cellspacing="0" cellpadding="0" tag="A">
							<tbody>
								<tr>
									<td><span
										style="display: block; width: 90px; float: left; text-align: right;">模板编号：</span>
										<span id="PayPrjID" class="span_id"
										style="display: block; width: 100px; float: left" class="lb"
										tag="LbPayPrjID">${list.templateId}</span></td>
								</tr>
								<tr>
									<td><span
										style="display: block; width: 90px; float: left; text-align: right;">模板名称：</span>
										<span id="PayPrjName" class="lb" tag="LbPayPrjName">${list.templateName}</span></td>
								</tr>
								<tr>
									<td><span
										style="display: block; width: 90px; float: left; text-align: right;">创建者：</span>
										<span id="ExPayPrjType" class="lb" tag="LxPayPrjType">${sm.creator}</span></td>
								</tr>
								<tr>
									<td><span
										style="display: block; width: 90px; float: left; text-align: right;">创建日期：</span>
										<span id="Amount" class="lb" tag="LbAmount">${sm.socialTableModTime}</span></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<!-- //t6yujhhidusokad -->
				<div class="viewToolHead" style="margin-top: 15px;">
					<div style="font-size: 14px;">
						概要 <a class="easyui-linkbutton social-table-mod-add-mod-add"
							data-options="text:'批量添加项目',iconCls:'icon-add',plain:true"
							type="submit"></a>
							<a class="easyui-linkbutton social-table-mod-add-xmod-add"
							data-options="text:'添加新项目',iconCls:'icon-add',plain:true"
							type="submit"></a>
					</div>

					<div style="border-top: 2px solid #2B91D5; width: 80%; display: inline-block; margin-right: 15px;">
						<div class="social-table-mod-add-mod-left"
							style="float: left; border: 1px solid #2B91D5; margin-top: 10px; width: 24%; height: 331px;">
							<table class="easyui-datagrid" id="social-table-mod-add-mod-left-table"
								data-options=" 
											url:'social_table_mod_browse_table_left?id='+${sm.socialTableModId},
											fit:true,
											singleSelect:true,
											nowrap:true,
											rownumbers:true
										">
								<thead>
									<tr>
										<th data-options="field:'id',align:'center',">编号</th>
										<th data-options="field:'name',align:'center',">名称</th>
										<th data-options="field:'money',align:'center',">金额</th>
										<th data-options="field:'numerical',align:'center',">数据来源</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
						<div 
							style="float: left; border: 1px solid #2B91D5; margin-top: 10px; margin-left: 10px; width: 70%; height:  331px;">
							
							<div class="easyui-panel social-table-mod-add-mod-right">
							
							</div>
						</div>
					</div>

				</div>

				<!-- 弹框选择模块 -->
				<div id="social-table-mod-dialog" class="easyui-dialog"
					data-options="width:500,
						height:450,
						title:'清单查找',
						modal:true,
						closed:true,
						buttons:[{
						text:'保存',
						handler:function(){
										var ids = $('#social-table-mod-table-add-mod').datagrid('getSelections');//获取选中表行
												$('#socizl-table-mod-browse-from').form({
													url:'social_table_mod_compileyw',
													onSubmit: function(params){
														parent.$.messager.progress({
														    title : '提示',
														    text : '新增处理中，请稍后....'
														});
														var j=0;
														for(var i = 0; i < ids.length; i ++){
															if(!ids[i].children){
																<!-- alert(ids[i].id); 获取选中id的值-->
																 params['id['+j+']']=ids[i].id;
																 j++;
															}
														}
														<!-- span标签内的id -->
														params['socialTableModId']=$('.span_id').text();
													},
													success:function(){
														$.messager.progress('close');	// 如果提交成功则隐藏进度条
														$('#social-table-mod-dialog').dialog('close');
														$('#social-table-mod-add-mod-left-table').datagrid({ url: 'social_table_mod_browse_table_left?id='+${sm.socialTableModId}});//重新指定url
                    									$('#social-table-mod-add-mod-left-table').datagrid('load',{});
													}
												}).submit();
							
						}
					},{
						text:'关闭',
						handler:function(){
							$('#social-table-mod-dialog').dialog('close');
						}
					}]">

					<table  id="social-table-mod-table-add-mod" class="easyui-datagrid"
						data-options="
								pagination:true,
								pageSize:16,
								pageList:[5,7,16],
								url:'modaddSeslect_forid',
								fitColumns:true,
								fit:true,
								nowrap:false,
								autoRowHeight:true,
								rownumbers:true,
								striped:true
							">
						<thead>
							<div style="background: #CEDEFA; padding-left: 40px;">
								<input class="easyui-textbox social-mod-sousuo-input"
									data-options="label:'项目编号或名称：',width:220,labelWidth:130" />
								<button class="easyui-linkbutton social-mod-sousuo-button" data-options="text:'搜索' "></button>
							</div>
							
							<tr>
								<th data-options="field:'id',width:50">项目编号</th>
								<th data-options="field:'name',width:50">项目名称</th>
								<th data-options="field:'money',width:50">金额</th>
								<th data-options="field:'che',width:50,checkbox:true"></th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
		</form>
	</div>
</body>
</html>